import QtQuick 2.15
import QtQuick.Controls 2.2
import QtQuick.Layouts
import QtQuick.Controls.Material
import "../Component"
ApplicationWindow {
    visible: true
    width: 640
    height: 480
    title: "Custom Window with Border"
  
    ColumnLayout{

        anchors.fill: parent
         
        Button {
            radius: 0
            text: "Show Dialog"
            onClicked:  dialog.open()
        }   
        Dialog {
            id: dialog
            x:parent.width/2 - width/2
            y:parent.height/2 - height/2
        }
        MessageBox{
            id:messageBox
            //title:"Title"
            text:"This is a message box"
            buttons:MessageBox.Ok | MessageBox.Cancel
            onAccepted: console.log("Accepted")
        }
        Row{
            spacing: 10
            Button{
                text:"Default"
                onClicked:  messageBox.open()
            }
            Button{
                text:"Success"
            }
            Button{
                text:"Primary"
            }
            Button{
                text:"Warning"
            }
            Button{
                text:"Error"
            }
           

        }
         Row{
            spacing: 10
            Button{
                text:"Default"
                enabled:false
            }
            Button{
                text:"Success"
                enabled:false
            }
            Button{
                text:"Primary"
                enabled:false
            }
            Button{
                text:"Warning"
                enabled:false
            }
            Button{
                text:"Error"
                enabled:false
            }
        }
    }
}
